package com.mall.dao;

import com.mall.domain.OrderDetails;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface IOrderDetailsDao {


	@Results(id = "orderDetailsMap",
			value = {
					@Result(property = "itemId", column = "item_id"),
					@Result(property = "orderCode", column = "order_code"),
					@Result(property = "itemNum", column = "item_num"),
					@Result(property = "itemTitle", column = "item_title"),
					@Result(property = "itemPrice", column = "item_price"),
					@Result(property = "itemImage", column = "item_image")


			})
	@Select("select * from tb_order_details where order_code=#{orders_id}")
	List<OrderDetails> findOrderDetailsById(@Param("orders_id") String orders_id);


}
